package com.joysuch.wwyt.workflow.enums;

import java.util.*;

public enum ComponentCountEnum {
    /**
     * 需要进行统计的组件类型
     * 新增类型会加入到统计表中，请慎重！
     */
    RADIO("单选框", "radio"),
    TIME("时间", "time"),
    DIALOG("选择目标", "dialog"),
    SELECT("单选列表", "select"),
    INPUT("单行文本", "input"),
    TEXTAREA("多行文本", "textarea")
    ;

    private String name;
    private String code;

    ComponentCountEnum(String name, String code) {
        this.name = name;
        this.code = code;
    }

    private static final List<String> lookup = new ArrayList<>();

    static {
        for (ComponentCountEnum e : EnumSet.allOf(ComponentCountEnum.class)) {
            lookup.add(e.code);
        }
    }
    public static List<String> getAllCountType(){
        return lookup;
    }

    public String getName() {
        return name;
    }

    public String getCode() {
        return code;
    }
}
